package com.example.j20240419springaop.controller;

import com.example.j20240419springaop.config.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @MyAspect
    @RequestMapping("/t1")
    public void test1() {
        log.info("run test1");
    }

    @RequestMapping("/t2")
    public void test2() {
        int a = 10 / 0;
        log.info("run test2");
    }
}
